package testcase;

import static org.junit.Assert.*;

import java.awt.event.KeyEvent;
import org.junit.Test;

import entity.GameMovableObj;



public  class GameMovableObjTest  {

        
         public class GameMovableObjSub extends GameMovableObj {
                 public GameMovableObjSub(String imgs) {
                        super(imgs);
                                
                    }
                        public GameMovableObjSub(String img, int cropwidth, int cropheight) {
                                super(img,cropwidth,cropheight);
                        }
                        @Override
                        public void keyPressed(KeyEvent e) {
                                
                        }
                        @Override
                        public void keyReleased(KeyEvent e) {      
                        }
         }
         GameMovableObjSub obj = new GameMovableObjSub ("/images/pieces/father.png");
         
        

        @Test
        public void testGetMoveDirection() {
                obj.setMoveDirection(1);
                int result=obj.getMoveDirection();
                assertEquals(result,1);
                
        }
        
        
        @Test
       public void testMove() {
          obj.move(20,0);
          int result=obj.getX();
          assertEquals(result,60);
          
       }

}